﻿using System;

namespace BitButterECS.Entity
{
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
	public class GlobalEntityAttribute : Attribute
	{
		public static bool IsGlobalEntity(BaseEntity entity)
		{
			var attrs = entity.GetType().GetCustomAttributes(typeof(GlobalEntityAttribute), true);
			if (attrs.Length > 0)
			{
				return true;
			}
			return false;
		}
	}
}
